feat(deployment): add screened provider marketplace to configure screen#3308
feat(deployment): add screened provider marketplace to configure screen#3308ygrishajev wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3308 +/- ##
==========================================
+ Coverage 68.80% 68.96% +0.16%
==========================================
Files 1096 1098 +2
Lines 26833 26913 +80
Branches 6436 6454 +18
==========================================
+ Hits 18462 18561 +99
+ Misses 7328 7317 -11
+ Partials 1043 1035 -8
🚀 New features to boost your workflow:
|
📝 WalkthroughWalkthroughThis PR implements placement-aware provider screening: it changes API resource validation to string-only, adds operationId and provider ChangesMarketplace Provider Screening Flow
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed due to a network error. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/console-api-types/src/schema.d.ts (1)
6792-6992:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
screenProvidersis missing from the generatedoperationstype surface.
operations.gen.tsnow exportsv1.screenProviders, and/v1/bid-screeningis present here, butinterface operationsin this file has noscreenProvidersmember. This leaves the generated SDK contract internally inconsistent and can break typed consumers expectingoperations["screenProviders"].Please regenerate
@akashnetwork/console-api-typesfrom the updated OpenAPI soscreenProvidersis present in both generated artifacts.As per coding guidelines,
packages/**/*.tsreviews must focus on breaking changes to public API surface, type safety, and missing exports.Also applies to: 7882-9507
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/console-api-types/src/schema.d.ts` around lines 6792 - 6992, The operations interface in the generated types (schema.d.ts) is missing the screenProviders member even though operations.gen.ts now exports v1.screenProviders (the /v1/bid-screening endpoint), causing an inconsistent public API; regenerate the console-api-types from the updated OpenAPI spec so the operations interface includes a "screenProviders" entry that matches the exported v1.screenProviders contract, ensuring /v1/bid-screening is present in both the operations.gen.ts export surface and the operations interface in schema.d.ts (re-run the OpenAPI-to-types generation script or CLI used by this repo and commit the updated generated files).Source: Coding guidelines
🧹 Nitpick comments (2)
apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx (1)
100-142: ⚡ Quick winAdd a direct assertion for
selectedPlacementNamepassthrough.
setup()now acceptsselectedPlacementName, but this suite still never verifies thatConfigureDeploymentPanesforwards it intoMarketplacePane. That leaves the new placement-scoped marketplace path untested even though it is part of the runtime contract.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx` around lines 100 - 142, The test never asserts that ConfigureDeploymentPanes forwards selectedPlacementName into the MarketplacePane; update the test to mock MarketplacePane (reuse the MarketplacePane entry in the dependencies object) so it captures props, pass a non-null selectedPlacementName into setup(), render, and add an assertion that MarketplacePane was called with props.selectedPlacementName equal to the value you passed; locate the mock MarketplacePane in setup(), make it return a testid element and expose the mock from setup() (alongside SdlPreviewPane, DeploymentPane, ConfigurationPane), then add an expect(MarketplacePane).toHaveBeenCalledWith(expect.objectContaining({ selectedPlacementName: 'your-test-value' }), expect.anything()) to verify passthrough from ConfigureDeploymentPanes.apps/deploy-web/src/queries/useScreenedProviders.spec.tsx (1)
77-87: ⚡ Quick winReplace the unsafe test-only casts in
apps/deploy-web/src/queries/useScreenedProviders.spec.tsxandapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx.Both files bypass collaborator typing with
as unknown as/as never, which suppresses type drift in the generated API and injected dependency contracts. One typed mock/stub pattern should be used in both files so these tests keep validating the real shape they depend on.As per coding guidelines, use
mock<T>()instead ofas unknown as <Type>for type casting in tests.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/deploy-web/src/queries/useScreenedProviders.spec.tsx` around lines 77 - 87, The test uses unsafe casts (as unknown as / as never) to build the api stub in the setup function (variables: useQuery, api) which hides signature drift; replace these casts with a properly typed test mock using mock<T>() so the stub enforces the real API shape — e.g., create a typed mock for ReturnType<NonNullable<NonNullable<NonNullable<Parameters<typeof setupQuery>[1]>["services"]>["api"]>> and assign useQuery into its v1.screenProviders.useQuery property using mock<T> to preserve types; apply the same typed-mock pattern in MarketplacePane.spec.tsx so both tests validate the actual collaborator contracts instead of using as unknown/as never.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx`:
- Around line 41-43: When a selected service is removed the watched
services/placements can transiently make resolveSelectedPlacementName(...)
return null; compute an effective selected service id from the watched values
during render instead of relying on the effect-driven selectedServiceId.
Concretely: use the values returned by useWatch (services and placements) to
check whether selectedServiceId still exists; if not, pick a surviving service
id (e.g., first key of services) as the effective id and pass that into
resolveSelectedPlacementName(services, placements, effectiveSelectedServiceId)
so placementName never becomes null and MarketplacePane won't fall back to the
unscoped catalog.
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx`:
- Line 26: The test incorrectly asserts a second call argument for the mocked
component; update the assertion in MarketplacePane.spec.tsx to only check the
props object passed to the mock: change the toHaveBeenCalledWith invocation for
MarketplaceProvidersTable to assert only expect.objectContaining({ providers,
isLoading: false }) (omit the second expect.anything()), since the JSX render
calls the mock with a single props argument.
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsx`:
- Around line 25-32: The component currently replaces the table with an error
alert whenever isError is true; instead, keep rendering the
d.MarketplaceProvidersTable when useScreenedProviders' providers array has items
even if isError is true. Update the JSX conditional in MarketplacePane.tsx to
show the "Failed to load providers" alert only when isError && providers.length
=== 0, otherwise render d.MarketplaceProvidersTable with providers and
isLoading; this preserves prior data from useScreenedProviders/query.data on
refetch failures.
---
Outside diff comments:
In `@packages/console-api-types/src/schema.d.ts`:
- Around line 6792-6992: The operations interface in the generated types
(schema.d.ts) is missing the screenProviders member even though
operations.gen.ts now exports v1.screenProviders (the /v1/bid-screening
endpoint), causing an inconsistent public API; regenerate the console-api-types
from the updated OpenAPI spec so the operations interface includes a
"screenProviders" entry that matches the exported v1.screenProviders contract,
ensuring /v1/bid-screening is present in both the operations.gen.ts export
surface and the operations interface in schema.d.ts (re-run the OpenAPI-to-types
generation script or CLI used by this repo and commit the updated generated
files).
---
Nitpick comments:
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx`:
- Around line 100-142: The test never asserts that ConfigureDeploymentPanes
forwards selectedPlacementName into the MarketplacePane; update the test to mock
MarketplacePane (reuse the MarketplacePane entry in the dependencies object) so
it captures props, pass a non-null selectedPlacementName into setup(), render,
and add an assertion that MarketplacePane was called with
props.selectedPlacementName equal to the value you passed; locate the mock
MarketplacePane in setup(), make it return a testid element and expose the mock
from setup() (alongside SdlPreviewPane, DeploymentPane, ConfigurationPane), then
add an expect(MarketplacePane).toHaveBeenCalledWith(expect.objectContaining({
selectedPlacementName: 'your-test-value' }), expect.anything()) to verify
passthrough from ConfigureDeploymentPanes.
In `@apps/deploy-web/src/queries/useScreenedProviders.spec.tsx`:
- Around line 77-87: The test uses unsafe casts (as unknown as / as never) to
build the api stub in the setup function (variables: useQuery, api) which hides
signature drift; replace these casts with a properly typed test mock using
mock<T>() so the stub enforces the real API shape — e.g., create a typed mock
for ReturnType<NonNullable<NonNullable<NonNullable<Parameters<typeof
setupQuery>[1]>["services"]>["api"]>> and assign useQuery into its
v1.screenProviders.useQuery property using mock<T> to preserve types; apply the
same typed-mock pattern in MarketplacePane.spec.tsx so both tests validate the
actual collaborator contracts instead of using as unknown/as never.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fbd4e12c-b6b8-4d71-90af-06393bfbe64c
📒 Files selected for processing (23)
apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.tsapps/api/src/bid-screening/http-schemas/bid-screening.schema.tsapps/api/src/bid-screening/routes/bid-screening.router.tsapps/api/swagger/openapi.jsonapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/ServiceRow/ServiceRow.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.tsapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsxapps/deploy-web/src/queries/useScreenedProviders.spec.tsxapps/deploy-web/src/queries/useScreenedProviders.tspackages/console-api-types/src/operations.gen.tspackages/console-api-types/src/schema.d.tspackages/dev-config/.eslintrc.base.js
036865f to
4b8349a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx`:
- Line 26: The two assertions incorrectly expect a second argument when
verifying the JSX-rendered function component MarketplaceProvidersTable; update
the test to inspect the actual props object passed by examining
MarketplaceProvidersTable.mock.calls[0]?.[0] (and similarly for the other
assertion around line 41) instead of using toHaveBeenCalledWith(...,
expect.anything()), so you assert the props (e.g., providers and isLoading)
directly from mock.calls[0][0].
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 30ef429b-f011-4fff-9600-cf3501784cde
⛔ Files ignored due to path filters (1)
apps/api/test/functional/__snapshots__/docs.spec.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (27)
apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.tsapps/api/src/bid-screening/http-schemas/bid-screening.schema.tsapps/api/src/bid-screening/routes/bid-screening.router.tsapps/api/swagger/openapi.jsonapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/ServiceRow/ServiceRow.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.tsapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsxapps/deploy-web/src/queries/useScreenedProviders.spec.tsxapps/deploy-web/src/queries/useScreenedProviders.tsapps/deploy-web/src/types/sdlBuilder/sdlBuilder.tspackages/console-api-types/src/operations.gen.tspackages/console-api-types/src/schema.d.tspackages/dev-config/.eslintrc.base.js
✅ Files skipped from review due to trivial changes (2)
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/ServiceRow/ServiceRow.tsx
- packages/console-api-types/src/schema.d.ts
🚧 Files skipped from review as they are similar to previous changes (17)
- packages/dev-config/.eslintrc.base.js
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsx
- packages/console-api-types/src/operations.gen.ts
- apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.ts
- apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.ts
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx
- apps/api/src/bid-screening/http-schemas/bid-screening.schema.ts
- apps/api/swagger/openapi.json
- apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.spec.tsx
- apps/deploy-web/src/queries/useScreenedProviders.ts
| const providers = [makeProvider()]; | ||
| const { MarketplaceProvidersTable } = setup({ providers, isLoading: false }); | ||
|
|
||
| expect(MarketplaceProvidersTable).toHaveBeenCalledWith(expect.objectContaining({ providers, isLoading: false }), expect.anything()); |
There was a problem hiding this comment.
Root cause: Both assertions at lines 26 and 41 incorrectly expect a second argument when verifying JSX-rendered function component calls.
React invokes function components via JSX with only a props object; the second parameter is always undefined. expect.anything() does not match undefined, making these assertions fail their intent. Replace both toHaveBeenCalledWith calls with direct inspection of mock.calls[0]?.[0].
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx`
at line 26, The two assertions incorrectly expect a second argument when
verifying the JSX-rendered function component MarketplaceProvidersTable; update
the test to inspect the actual props object passed by examining
MarketplaceProvidersTable.mock.calls[0]?.[0] (and similarly for the other
assertion around line 41) instead of using toHaveBeenCalledWith(...,
expect.anything()), so you assert the props (e.g., providers and isLoading)
directly from mock.calls[0][0].
4b8349a to
6a51238
Compare
Populate the Compute Marketplace pane with audited providers screened for the selected placement's group spec, and drive it from the deployment pane's service/placement selection. API / SDK - expose the screenProviders operationId on POST /v1/bid-screening and surface it in the typed console-api-types SDK (incl. the location response field) - validate (don't transform) resource values in the request schema so the proxy forwards them without a BigInt serialization error - register the "screen" domain verb for the operation-id-format lint rule Marketplace (deploy-web) - useScreenedProviders: screens the selected placement's group spec (audited via signedBy, region via attributes), falling back to the full audited catalog (empty resources) while the SDL is mid-edit/invalid - MarketplaceProvidersTable: design-system table with sortable Provider/Region columns and an empty Cost column with an estimate tooltip; host formatted like the bid list via getProviderNameFromUri - MarketplacePane keeps the cached table on a refetch error; shows the error only when there is nothing to display Deployment pane selection - clicking a service selects it; clicking a placement selects its first service; adding a placement adds a default service; selected service/placement states - resolve the selected placement in the form and pass it to the marketplace - normalize a service-less carried-in SDL to a default at the configure entry, so the selected service/placement are always present (required, non-nullable) - require the service id in the form schema (always generated) to drop id casts
6a51238 to
9e619c4
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx`:
- Around line 18-21: The Provider column is sorted by the raw hostUri but
renders getProviderNameFromUri(info.getValue()), causing mismatched sort order
when schemes/ports differ; update the column definition created with
columnHelper.accessor("hostUri") so its sort value matches the rendered hostname
(use the provider name derived by getProviderNameFromUri as the sort key or
change the accessor to return that name) and keep the header using
SortableHeader and cell using ShortenedValue(getProviderNameFromUri(...)); also
extend the existing test to include rows with mixed schemes/ports so it asserts
that displayed order (ShortenedValue/getProviderNameFromUri) equals the sort
order.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4277164a-3996-403f-b95d-30a8d0d09d40
⛔ Files ignored due to path filters (1)
apps/api/test/functional/__snapshots__/docs.spec.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (28)
apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.tsapps/api/src/bid-screening/http-schemas/bid-screening.schema.tsapps/api/src/bid-screening/routes/bid-screening.router.tsapps/api/swagger/openapi.jsonapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/ServiceRow/ServiceRow.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.tsapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsxapps/deploy-web/src/queries/useScreenedProviders.spec.tsxapps/deploy-web/src/queries/useScreenedProviders.tsapps/deploy-web/src/types/sdlBuilder/sdlBuilder.spec.tsapps/deploy-web/src/types/sdlBuilder/sdlBuilder.tspackages/console-api-types/src/operations.gen.tspackages/console-api-types/src/schema.d.tspackages/dev-config/.eslintrc.base.js
✅ Files skipped from review due to trivial changes (1)
- packages/console-api-types/src/schema.d.ts
🚧 Files skipped from review as they are similar to previous changes (26)
- apps/api/src/bid-screening/routes/bid-screening.router.ts
- packages/dev-config/.eslintrc.base.js
- apps/deploy-web/src/types/sdlBuilder/sdlBuilder.ts
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.spec.tsx
- apps/api/swagger/openapi.json
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/ServiceRow/ServiceRow.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.ts
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.spec.tsx
- apps/api/src/bid-screening/http-schemas/bid-screening.schema.ts
- packages/console-api-types/src/operations.gen.ts
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsx
- apps/deploy-web/src/queries/useScreenedProviders.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsx
- apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.ts
- apps/deploy-web/src/types/sdlBuilder/sdlBuilder.spec.ts
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
- apps/deploy-web/src/queries/useScreenedProviders.ts
| columnHelper.accessor("hostUri", { | ||
| header: ({ column }) => <SortableHeader column={column} title="Provider" />, | ||
| cell: info => <ShortenedValue value={getProviderNameFromUri(info.getValue())} maxLength={40} headLength={14} /> | ||
| }), |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Locate the file and print the relevant section with line numbers
FILE="apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx"
echo "== File = $FILE =="
wc -l "$FILE"
sed -n '1,220p' "$FILE" | nl -ba | sed -n '1,140p'
echo
echo "== Provider name helper usage =="
rg -n "getProviderNameFromUri|hostUri|accessor\\(" "$FILE"
echo
echo "== Find tests mentioning MarketplaceProvidersTable or Provider sorting =="
rg -n "MarketplaceProvidersTable|getProviderNameFromUri|Provider.*sort|ascending sort|scheme.*port|NO_REGION" apps/deploy-web -S --glob='**/*.{ts,tsx,js,jsx}'Repository: akash-network/console
Length of output: 413
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx"
echo "== File = $FILE =="
wc -l "$FILE"
echo
echo "== Lines 1-140 (with line numbers via cat -n) =="
cat -n "$FILE" | sed -n '1,140p'
echo
echo "== Search within file for relevant identifiers =="
rg -n "getProviderNameFromUri|hostUri|accessor\\(" "$FILE"
echo
echo "== Search for related tests/usages =="
rg -n "MarketplaceProvidersTable|getProviderNameFromUri|Provider.*sort|ascending sort|scheme.*port|NO_REGION" apps/deploy-web -S --glob='**/*.{ts,tsx,js,jsx}'Repository: akash-network/console
Length of output: 9948
🏁 Script executed:
#!/bin/bash
set -euo pipefail
SPEC="apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsx"
UTIL="apps/deploy-web/src/utils/providerUtils.ts"
echo "== SPEC = $SPEC =="
wc -l "$SPEC"
echo
cat -n "$SPEC" | sed -n '1,200p'
echo
echo "== UTIL = $UTIL =="
wc -l "$UTIL"
echo
cat -n "$UTIL" | sed -n '1,140p'Repository: akash-network/console
Length of output: 6091
Fix Provider column sort key to match rendered hostname
The table sorts by hostUri (column accessor), but renders getProviderNameFromUri(info.getValue()) (hostname). If schemes/ports differ, rows can appear ordered differently than what users see.
Suggested fix
const columns = [
- columnHelper.accessor("hostUri", {
+ columnHelper.accessor(provider => getProviderNameFromUri(provider.hostUri), {
+ id: "hostUri",
header: ({ column }) => <SortableHeader column={column} title="Provider" />,
- cell: info => <ShortenedValue value={getProviderNameFromUri(info.getValue())} maxLength={40} headLength={14} />
+ cell: info => <ShortenedValue value={info.getValue()} maxLength={40} headLength={14} />
}),Current test only changes hostnames (same scheme/port), so it won’t catch this mismatch—add a mixed scheme/port case to ensure displayed order == sort order.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| columnHelper.accessor("hostUri", { | |
| header: ({ column }) => <SortableHeader column={column} title="Provider" />, | |
| cell: info => <ShortenedValue value={getProviderNameFromUri(info.getValue())} maxLength={40} headLength={14} /> | |
| }), | |
| columnHelper.accessor(provider => getProviderNameFromUri(provider.hostUri), { | |
| id: "hostUri", | |
| header: ({ column }) => <SortableHeader column={column} title="Provider" />, | |
| cell: info => <ShortenedValue value={info.getValue()} maxLength={40} headLength={14} /> | |
| }), |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx`
around lines 18 - 21, The Provider column is sorted by the raw hostUri but
renders getProviderNameFromUri(info.getValue()), causing mismatched sort order
when schemes/ports differ; update the column definition created with
columnHelper.accessor("hostUri") so its sort value matches the rendered hostname
(use the provider name derived by getProviderNameFromUri as the sort key or
change the accessor to return that name) and keep the header using
SortableHeader and cell using ShortenedValue(getProviderNameFromUri(...)); also
extend the existing test to include rows with mixed schemes/ports so it asserts
that displayed order (ShortenedValue/getProviderNameFromUri) equals the sort
order.
| dcloud: | ||
| pricing: | ||
| web: | ||
| denom: uakt |
Why
The Compute Marketplace pane on the Configure screen showed no providers. Users need to see audited providers screened against the selected placement's group spec so they can pick where to deploy.
Closes CON-421
What
screenProvidersoperationId onPOST /v1/bid-screeningand regenerate the typedconsole-api-typesSDK (incl. thelocationresponse field).screendomain verb for the operation-id-format lint rule.useScreenedProviders: screens the selected placement's group spec (audited viasignedBy, region via attributes), falling back to the full audited catalog (empty resources) when no placement/SDL is available.MarketplaceProvidersTable(Provider, Region, sortable; empty Cost column with an estimate tooltip) styled to the design system; host shown like the bid list viagetProviderNameFromUri.Summary by CodeRabbit
New Features
Bug Fixes
Tests